<?php
/**
 * StudentGrandparents form
 *
 * @version $Id: StudentGrandparents.php 73 2010-04-25 00:30:44Z yingkuang.chen@gmail.com $
 * @license New BSD License
 * @uses Zend_Form
 * @package student
 * @subpackage Form
 */
class Student_Form_StudentGrandparents extends Sfs_Form
{

protected $_arrayData;
    function __construct($options=null){
        $locale = Bootstrap::$config['resources']['locale']['default'];
        $path = dirname(__FILE__)."/../languages/$locale/data.ini";
        $ini = new Zend_Config_Ini($path);
        $this->_arrayData = $ini->get('array_data')->toArray();

        parent::__construct($options);
    }
    /**
     * initialization routine
     *
     * @return void
     */
    public function init()
    {
        $this->setMethod('post');
        $this->addElement('hidden', 'sn', array(
        	'label'      => 'sn',
        	'filters'    => array('StringTrim'),
            'decorators' => $this->noElementDecorator,
        //	'validators' => array()
        	)
        );
        $this->addElement('text', 'name', array(
        	'label'      => 'name',
            'size'		=> 12,
        	'filters'    => array('StringTrim'),
        //	'validators' => array()
        	)
        );

        $this->addElement('radio', 'alive', array(
        	'label'      => 'alive',
        	'filters'    => array('StringTrim'),
             'multiOPtions' => $this->_arrayData['whether'],
        	'separator'=>'&nbsp;'
        //	'validators' => array()
        	)
        );
        $this->addElement('hidden', 'student_sn', array(
        	'label'      => 'student_sn',
        		'decorators' => $this->noElementDecorator,
        	'validators' => array('int'),
        	'filters'    => array('StringTrim','StripTags'),
        //	'validators' => array()
        	)
        );
    }


}
